CMAKE_MINIMUM_REQUIRED(VERSION 3.15)

# 导入 Qt 模块
find_package(Qt6 COMPONENTS Core Quick Qml REQUIRED)

# 设置Qt相关的变量
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)         # 资源文件处理
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

# 添加头文件
include_directories(${PROJECT_SOURCE_DIR}/include)

# 添加可执行文件
message("${UNI_SRC_FILES}")
message("${UNI_HEADER_FILES}")
add_library(${LIBRARY_NAME} SHARED ${UNI_SRC_FILES} ${UNI_HEADER_FILES})


# 链接 Qt 库
target_link_libraries(${LIBRARY_NAME} PRIVATE
    Qt6::Core
    Qt6::Quick
    Qt6::Qml
)